{% include "rpgEngine/head.html" %}
<script language="JavaScript" src="{{ MEDIA_URL }}shared/team.js">
</script>
<div id="primarycontent">
	<div class="teamPageSelect">
		{% autoescape off %}
		{{ pageSelect }}
		{% endautoescape %}
	</div>
	<h1>Team : chest</h1>
	</br>
	{% ifnotequal iscapForm None %}
	<form id="formIscap" action="/team/" method="post">
		I.S.C.A.P. :{{ iscapForm.iscap }}
		<input type="submit" id="iscapSave" name="iscapSave" value="Save" alt="Save I.S.C.A.P." />
	</form>
	{% if isErrorIscap %}
		<p id="errorMessage">I.S.C.A.P. is within 0 - 999</p>
	{% endif %}
	{% endifnotequal %}
	<form id="formAddItem" action="/team/" method="post">
	<table>
		<tr><td>{{ form.name.label_tag }} :</td>
		    <td>{{ form.name }}</td>
		    <td>{{ form.quantity.label_tag }} :</td>
		    <td>{{ form.quantity }}</td>
		</tr>
		<tr><td td colspan="4">
			<div>{{ form.description }}</div>
		    </td>
		</tr>
		<tr><td td colspan="4" style="text-align:right;"><input type="submit" id="addItem" name="addItem" value="Save" alt="Save Item" /></td>
		</tr>
	</table>
	{{ form.isEdit }}
	</form>
	{% if isError %}
		<p id="errorMessage">The Item is not valid, please fill up the name, quantity and description fields</p>
	{% endif %}

	{% for id, name, description, quantity in items %}
	<div class="inventoryItem" id="{{id}}">
		<div class="header">
			<div class="quantity">
				 {{quantity}}
			</div>
			<span class="name">{{name|safe}}</span>
			 - <a href="/team/editItem/{{id}}/"><small>edit</small></a>
			 - <a href="" onclick="confirmDeleteChest('{{ id }}', '{{ name }}')"><small>delete</small></a>
		</div>
		<div class="content">
		{{description|safe}}
		</div>
	</div>
	{% endfor %}
	
	
	<br/>
</div>
{% include "rpgEngine/foot.html" %}


